<?php for($i=1;$i<25;$i++){ ?>
  <div class="filteritem col-xs-3 <?php echo $i%2?'filtergood':'filtertime'; ?>" data-cat="<?php echo $i%2?'filtergood':'filtertime'; ?>">
    <a href="./course_detail.php?i=1">
    <div class="section-item tran3 wow fadeIn" data-wow-duration="1s"  data-wow-offset="10"  data-wow-iteration="1">
      <div class="item-img" style="background-image:url(../../assets/img/course<?php echo $i%3+1; ?>.jpg)" ></div>
      <div class="item-caption op6">
        <p class="caption-title">课程标题<?php echo $i; ?></p>
        <p class="caption-subtitle oneline">课程描述课程描述课程描述课程描述课程描述课程描述</p>
        <p><span class="caption-user">某老师</span><span class="caption-time">2017-01-01</span></p>
      </div>
    </div>
    </a>
  </div>  
<?php } ?>